/******************************************************************************
* File description: runningtemperature.qml
* Function: 实验运行：温度页面
* Current Version: 1.0.0
* Author: 张宇轩
* Date: 2024-08-26
*  -----
*  Copyright by 博坤生物 .
 *****************************************************************************/
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import QtGraphicalEffects 1.14

Item {
    id: root

    /* property 定义开始 */

    /* property 定义结束 */

    // 顶部导航栏
    TabbarNav {
        id: tabNav
        width: parent.width
        isEnable: true
        title: "温度"

        onReturnSig: {
            console.log("tabbar nav")
        }
        z: 999
    }

    ColumnLayout {
        anchors.fill: parent
        spacing: 0

        // 主体部分
        Rectangle {
            id: mainPart
            Layout.fillWidth: true
            Layout.preferredHeight: parent.height - btnContainer.height
            Layout.alignment: Qt.AlignTop

            // 背景
            Rectangle {
                anchors.fill: parent
                LinearGradient {
                    anchors.fill: parent
                    start: Qt.point(0, 0)
                    end: Qt.point(0, height)
                    gradient: Gradient {
                        GradientStop {position: 0.0; color: "#007BD8"}
                        GradientStop {position: 1.0; color: "#001A5A"}
                    }
                }
            }

            // 温度
            Rectangle {
                id: tempContainer
                anchors {
                    fill: parent
                    leftMargin: 212
                    rightMargin: 212
                    topMargin: 95 + tabNav.height
                    bottomMargin: 150
                }
                color: "#C3FFFFFF"
                radius: 12

                // 温度表格
                RunningTemperatureTable {
                    anchors {
                        fill: parent
                        topMargin: 50
                        bottomMargin: 50
                        leftMargin: 132
                        rightMargin: 132
                    }
                }
            }
        }

        // 按钮部分
        Rectangle {
            id: btnContainer
            Layout.fillWidth: true
            Layout.preferredHeight: 80
            RowLayout {
                height: parent.height
                anchors.rightMargin: 16
                anchors.right: parent.right
                PureButton {
                    id: canceledBtn
                    pureText: "取消(C)"
                    Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
                }
            }
        }
    }
}
